Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigator: land: fix when flying without global position estimate #23845

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Oct 23, 2024

Solved Problem

Fixes #21524
Fixes #23773
Proposes a partial alternative to #23839

Land without global position estimate (e.g. GNSS-denied without manually initialized position) was broken since efc8c16. Instead of landing at the current spot it flew to (0/0).

Solution

Set lat/lon fields of triplet to NAN if global position is not valid. Further I disable the breaking distance calculation in this case, as it's requiring global position. Will be anyway removed from Navigator with #23678.

Changelog Entry

For release notes:

Bugfix: Navigator: land: fix when flying without global position estimate

Alternatives

Test coverage

SITL tested.

Context

Land without global position only works with MC vehicles, FW requires global position.

Copy link
Contributor

@AlexisTM AlexisTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it in simulation and it properly lands in position without a GPS

@ptrindade96
Copy link

Hi @sfuhrer. It would be nice if you could backport this to v1.14, since the same issue occurs with that version.

You can take a look in this discussion.

@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/auto-land-going-to-the-origin-with-optical-flow/40767/3

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I blew up your pr with the last naming refactoring commit but the breaking functions haunted me 😇 Feel free to change it again or I can also make a separate pr.

@MaEtUgR
Copy link
Member

MaEtUgR commented Oct 24, 2024

It would be nice if you could backport this to v1.14, since the same issue occurs with that version.

We usually only do point releases on the last stable but it's maybe worth a backport if people are struggling...

@sfuhrer sfuhrer merged commit 37190d4 into main Oct 25, 2024
56 of 57 checks passed
@sfuhrer sfuhrer deleted the pr-navigator-allow-land-without-global-pos-main branch October 25, 2024 11:56
@sfuhrer
Copy link
Contributor Author

sfuhrer commented Oct 25, 2024

Hi @sfuhrer. It would be nice if you could backport this to v1.14, since the same issue occurs with that version.

You can take a look in this discussion.

I don't think there are any more 1.14 releases planned, as we now have 1.15 out already. I will thus port it to the 1.15 branch.

@duguguang
Copy link

how about the takeoff command?

@ptrindade96
Copy link

Hi @sfuhrer. It would be nice if you could backport this to v1.14, since the same issue occurs with that version.
You can take a look in this discussion.

I don't think there are any more 1.14 releases planned, as we now have 1.15 out already. I will thus port it to the 1.15 branch.

That's ok, at least for me it makes no difference. Thanks for your help Silvan.

@sfuhrer
Copy link
Contributor Author

sfuhrer commented Oct 30, 2024

how about the takeoff command?

Good point. I've re-opened #21524.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local Position only Takeoff Problems for Multicopter [Bug] Auto land is unsafe without a global position
6 participants